Skip to content

Conversation

@daleonov
Copy link

@daleonov daleonov commented Nov 2, 2025

Now you can do this:

const auto myPropertiesFileOptions = juce::PropertiesFile::Options()
    .withStorageFormat (juce::PropertiesFile::StorageFormat::storeAsBinary)
    .withIgnoreCaseOfKeyNames (true);

For projects written in C++17, other ways of instantiating this object and modifying just a few selected members is too awkward in my opinion. I had to make a separate builder class with a similar interface, but I believe this Options class should just have a built-in interface like this. Many other JUCE classes already do, like a similar Options class for Font, also File, String, Rectangle, Colour to name a few off the top of my head, so I was quite surprised to discover that this struct wasn't capable of that.

It may also be appropriate to add a few jasserts and fallbacks in those methods, but since this logic is mostly implemented in PropertiesFile class, I decided not to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant